package demo1216.pm;
/*
十八位：^[1-9]\d{5}(18|19|([23]\d))\d{2}
((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$

十五位：^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}[0-9Xx]$

341225 1999 0306 7541

 */
public class Demo_02 {
    public static void main(String[] args) {
        //1800--2999
        String regex = "^[1-9]\\d{5}(18|19|(2\\d))\\d{2}";
        //0306
        String month = "((0[1-9])|10|11|12)(0[1-9]|[12]\\d|30|31)";
        System.out.println("1212".matches(month));
        System.out.println("1212".matches(month));
    }
}
